import {
  request
} from './request.js'
import qs from 'qs'
export function hotel(method, params) {
  return request({
    url: 'supplier/hotel',
    method,
    params
  })
}
export function AddRoom(params) {
  return request({
    url: 'supplier/hotel/room/pms',
    method: 'POST',
    params
  })
}
// 编辑或者删除操作
export function RoomTypeSetting(params, method) {
  return request({
    url: 'supplier/hotel/room/pms',
    method,
    params
  })
}
// 获取所有房型
export function GetAllRoomType(params) {
  return request({
    url: 'supplier/hotel/room/pms',
    method: 'GET',
    params
  })
}
// 获取该房型所有房间
export function GetRooms(params) {
  return request({
    url: 'supplier/hotel/room-show/pms',
    method: 'GET',
    params
  })
}
// 删除房型
export function DelRoomType(params) {
  return request({
    url: 'supplier/hotel/room',
    method: 'DELETE',
    params
  })
}
// 列表-房间分组
export function RoomGroup(params, method) {
  return request({
    url: 'supplier/hotel/room/num/group',
    method,
    params
  })
}
// 编辑房间分组 
export function EditRoomGroup(params,) {
  return request({
    url: 'supplier/hotel/room/num/pms/group',
    method: 'PUT',
    data: qs.parse(params)
  })
}
// 根据ID获取房间
export function GetRoomIDGroup(params) {
  return request({
    url: 'supplier/hotel/room/num/pms/group',
    method: 'GET',
    params
  })
}
// 获取房间房态
export function GetRoomStatus(params) {
  return request({
    url: 'supplier/hotel-pms',
    method: 'GET',
    params
  })
}
// 获取房间房态日历
export function GetRoomChannels(params) {
  return request({
    url: 'supplier/hotel-pms/data',
    method: 'GET',
    params
  })
}
// 获取库存
export function GetRoomChannels_stockData(params) {
  return request({
    url: 'supplier/hotel-pms/stock-data',
    method: 'GET',
    params
  })
}
// supplier/hotel-pms/clean

// 设置脏净房
export function SetRoomChannels_clean(params) {
  return request({
    url: 'supplier/hotel-pms/clean',
    method: 'PUT',
    params
  })
}



// 获取单日房态
export function GetOne_dayRoom(params) {
  return request({
    url: 'supplier/hotel-pms/sign-day',
    method: 'GET',
    params
  })
}
//房间预订下单/直接入住
export function PMS_order(data) {
  return request({
    url: 'supplier/hotel-pms-order',
    method: 'POST',
    data
  })
}
///* 钟点房 */
export function hour_room(params, method) {
  return request({
    url: 'supplier/hotel-pms-hour-room',
    method,
    params
  })
}
// 房型价格列表
/* 
GET 获取
PUT 修改
*/
export function price_room(params, method) {
  return request({
    url: 'supplier/hotel-pms/price',
    method,
    params
  })
}



/**
 * 批量修改房价
 * PUT 修改
 * GET 获取
 */
export function batchPrice_room(params, method) {
  return request({
    url: 'supplier/hotel-pms/batch-price',
    method,
    params
  })
}

/**
 * 改价记录
 */
export function price_record(params) {
  return request({
    url: 'supplier/hotel-pms/price-record',
    method: 'GET',
    params
  })
}

/**
 * 改价记录
 */
export function price_record_detail(params) {
  return request({
    url: 'supplier/hotel-pms/price-record/detail',
    method: 'GET',
    params
  })
}

// 获取所有房间
export function GetAllRoom(params) {
  return request({
    url: 'supplier/hotel-pms-order/room-num',
    method: 'GET',
    params
  })
}